package com.woniu.woniuproject.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniu.woniuproject.entity.Debt_info;
import com.woniu.woniuproject.mapper.Debt_infoMapper;
import com.woniu.woniuproject.vo.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 功能描述:<br>
 * 〈〉
 *
 * @author 徐威
 * @create 2020/11/16
 * @since 1.0.0
 */
@Service
public class DebtInfoService {
    @Autowired
    Debt_infoMapper debt_infoMapper;

    public PageInfo<Debt_info> queryByAllbystatus(String debtTypeName, String matchedStatus, Page page){
        PageHelper.startPage(page.getNowPage(),page.getMaxPage());
        List<Debt_info> debt_infos = debt_infoMapper.selectBymatchedStatusAnddebtTypeName(matchedStatus, debtTypeName);
    PageInfo<Debt_info> info = new PageInfo<>(debt_infos);
    return  info;
    }
}
